package com.kaka.bus.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.kaka.bus.R;
import com.kaka.bus.bean.ProductState;
import com.kaka.bus.util.U;

import java.util.List;


/**
 * Created by zhangqi on 2017/11/15.
 */

public class ProductAdapter extends BaseQuickAdapter<ProductState, BaseViewHolder> {

    public ProductAdapter(int layoutResId, @Nullable List<ProductState> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ProductState item) {
        helper.setText(R.id.item_product_cb, U.connectString(item.getDay(),"期"))
        .addOnClickListener(R.id.item_product_cb).setChecked(R.id.item_product_cb,item.isCheck());
    }

}
